import { getSystem, openApp, getUrlQuery, parseKeyValue } from '../js/js'
import bridge from '../js/js1'
export function share ({ title, desc, imgUrl, shareUrl, share }) {
  console.log({ title, desc, imgUrl, shareUrl, share });
  const system = getSystem()
  if (system.android) {
    bridge.dsCall('h5Share', {
      title,
      desc,
      imgUrl,
      share,
      shareUrl
    })
  }
  if (system.iOS) {
    bridge.iosCall('h5Share', {
      title: title || '4999元颁奖啦！',
      desc: desc || '中奖用户&店主排名出炉啦！让咱们看看是哪些幸运儿！',
      imgUrl: imgUrl || 'https://download.yuanfuda933.com/h5/images/jiang.png',
      shareUrl: shareUrl || 'https://download.yuanfuda933.com/h5/other.html#/awarde',
      share: share || true
    }, res => { })
  }
}